'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.castScreen);
  router.get('/io', controller.home.io);
  router.post('/mobile/screenCapture/save', controller.home.saveScreenCapture);
  router.post('/mobile/screenCapture/saveBase64', controller.home.saveBase64ScreenCapture);
  router.post('/test', controller.home.test);

  // socket.io
  app.io.of('/').route('server', app.io.controller.home.server);
  app.io.of('/').route('exchange', app.io.controller.nsp.exchange);
};
